package dao;

import java.util.List;

import model.Curso;

public class DAOCurso extends ModelDAO<Curso>{
	public DAOCurso() {
        super(Curso.class);
    }
	
	public void save(Curso c){
		super.begin();
		super.save(c);
		super.commit();
	}
	
	public void update(Curso c){
		super.begin();
		super.update(c);
		super.commit();
	}
	
	public void delete(Curso c){
		super.begin();
		super.delete(c.getCodCurso());
		super.commit();
	}
	
	public Curso search(int cod){
		super.begin();
		Curso c = super.search(cod);
		super.commit();
		return c;
	}
	
	public List<Curso> listar(){
		super.begin();
        List<Curso> list = super.findAll();
        super.commit();
        return list;
    }
	

}
